import { loginApi } from "../../utils/api";
const loginApiModule = {
  state: {
    login: [],
  },
  mutations: {
    changelogin(state, payload) {
      state.login = payload;
    },
  },
  actions: {
    async getLogin({ commit }, payload) {
      const res = await loginApi({
        phone: payload.phone,
        code: payload.code,
      });
      commit("changelogin", res);
    },
  },
};
export default loginApiModule;
